<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			/* 浮动子盒上面必须给出父盒高度 
			因：浮动子盒撑不开父盒
			*/

			.box1 {
				border: 1px solid red;
				width: 300px;
				height: 300px;
			}

			/* 子盒设置宽度 */
			/* 子盒要浮动都浮动 */
			/* 浮动子盒的宽度是内容宽 */
			/* 浮动子盒的宽度之和是父盒宽,否则换行 */
			.box2 {
				border: 1px solid black;
				width: 100px;
				height: 150px;
				/* 浮动 */
				float: left;
				/* float: right; */
			}

			.box3 {
				border: 1px solid blue;
				width: 100px;
				height: 150px;

				float: left;
				/* float: right; */
			}

			.box4 {
				border: 1px solid green;
			}
		</style>
	</head>
	<body>
		<!-- div.box1>div.box2+div.box3 -->
		<div class="box1">
			<div class="box2">222222</div>
			<div class="box3">333</div>
		</div>
		<div class="box4">44444444</div>
	</body>
</html>
